var shownav1 = document.querySelector('.shownav1');
var nav2 = document.querySelector('.nav2');
var shownav2 = document.querySelector('.shownav2');
var nav3 = document.querySelector('.nav3');
var nav = document.querySelector('.nav');
shownav1.onmouseover = function(){
    nav2.style.display = 'block';
}
shownav1.onmouseout = function(){
    nav2.style.display = 'none';
}
//shownav1.onmouseover = show(nav2);
//shownav1.onmouseout = close(nav2);
//function show(obj){
//    obj.style.display = 'block';
//}
//function close(obj){
//    obj.style.display = 'none';
//}
shownav2.onmouseover = function(){
    nav3.style.display = 'block';
}
shownav2.onmouseout = function(){
    nav3.style.display = 'none';
}


window.onscroll=function(){
    var t =document.documentElement.scrollTop||document.body.scrollTop;
    if(t>330){
        nav.style.backgroundColor = '#8CC7E4';
    }
    else{
        nav.style.backgroundColor = 'none';
    }
}
